<template>
  <div class="user">
    个人资料

    <button @click="getInfo">获取个人资料</button>
  </div>
</template>

<script>
export default {
  name: 'UserCenter',
  methods: {
    getInfo() {
      this.axios({
        method: 'get',
        url: '/users/'
      })
      .then(res => {
        console.log('获取个人资料成功：', res)
      })
      .catch(err => {
        console.log('获取个人资料失败：', err)
      })
    }
  }
}
</script>